def check_fault():
    success_list = []
    with open("success_list.txt", 'r', encoding='utf-8') as f:
        success_email_str = f.read()
        if success_email_str:
            all_success_email_list = success_email_str.split("|")
            for success_email_str in all_success_email_list:
                success_email_list = success_email_str.split(" ")
                if success_email_list[0] != "":
                    success_list.append(success_email_list)

    with open("fault_list.txt", 'r', encoding='utf-8') as f:
        all_email_str = f.read()
        if all_email_str:
            all_email_str = all_email_str.split("|")
            for email_str in all_email_str:
                email_set = email_str.split(" ")
                if email_set[0] != "":
                    if email_set in success_list:
                        print("错误数据有冲突")
                        print(email_set)

        else:
            print("暂无数据")


if __name__ == '__main__':
    check_fault()
